﻿using System.Collections.Generic;
using DAO;
using DTO;

namespace BUS
{
    public class TinNhanBUS
    {
        public static TinNhanDTO getAlongCode(int maTinNhan)
        {
            return TinNhanDAO.getAlongCode(maTinNhan);
        }

        public static List<TinNhanDTO> getAll()
        {
            return TinNhanDAO.getAll();
        }

        public static List<TinNhanDTO> LayTinNhanTheoNguoiNhan(int maNguoiDung)
        {
            return TinNhanDAO.LayTinNhanTheoNguoiNhan(maNguoiDung);
        }

        public static int LaySoTinNhanChuaDoc(int maNguoiNhan)
        {
            return TinNhanDAO.LaySoTinNhanChuaDoc(maNguoiNhan);
        }

        public static void Insert(TinNhanDTO _insert)
        {
            TinNhanDAO.Insert(_insert);
        }

        public static void Delete(int maTinNhan)
        {
            TinNhanDAO.Delete(maTinNhan);
        }

        public static void Update(TinNhanDTO dto)
        {
            TinNhanDAO.Update(dto);
        }
    }
}
